<extend name="desktop_default/template/base_index" />
<block name="area_header">
    <link rel="stylesheet" href="__CSS__/account/style.css">
</block>

<block name="area_top">

</block>

<block name="area_content">
    <div class="bg-2 main2-content">
        <div class="login-wrap" id="login_form">
            <div class="title"><img src="__IMG__/account/login.png"></div>
            <div class="form-group" id="tip-wrap"></div>
            <div class="form-group">
                <label for="account" class="i account">帐号</label>
                <input type="text" id="account" name="account" placeholder="帐号" autofocus="autofocus" autocomplete=off>
            </div>
            <div class="form-group">
                <label for="psw" class="i psw">密码</label><input type="password" id="psw" name="psw" placeholder="密码" >
                <h4>
                    <!--<input class="auto-login" id="auto_login" name="auto-login" type="checkbox"><label for="auto_login">自动登录</label>-->
                    <a class="fr" href="{:U('mengwu/account/register')}">注册</a>
                </h4>
            </div>
            <div class="form-group">
                <br>
                <a class="btn login _post" id="login_btn" data-url="{:U('mengwu/account/login')}?redirect={:I('get.redirect')}" data-success-url="{$redirect_uri}" data-verify="verify" data-form="login_form" data-tip="正在登录..." href="javascript:void(0);">登录</a>
            </div>
            <div class="form-group">
                <br>
                <div class="other-login">
                    <em>快捷登录方式</em>
                    <a class="login weixin" href="{$weixin_login}" title="微信登录"></a>
                    <!--<a class="login weibo" href="javascript:void(0);" title="微博帐号登录"></a>-->
                </div>

            </div>
        </div>

    </div>
</block>

<block name="area_footer">
    <include file="desktop_default/template/footer_bottom" />
    <script type="text/javascript" src="__JS__/account/common.js"></script>
    <script type="text/javascript">
        function verify(data){
            var $r = "";
            $.each(data, function(i, field){
                name = field.name;
                value = $.trim(field.value);
                if(name=='account' && value==""){
                    $r = '帐号不能为空';
                    $('#account').focus();
                    return false;
                }
                if(name=='psw'){
                    if(value==""){
                        $r = '密码不能为空';
                        $('#psw').focus();
                        return false;
                    }
                }
            });
            return $r;
        }
    </script>
</block>